package com.fept.msgcore.msgserver.protocol.model.base;

import com.fept.msgcore.msgserver.common.model.ToString;

/**
 * Created by Srma on 1/13/2017.
 */
public abstract class BaseSegment extends ToString {

    /**
     *
     */
    private static final long serialVersionUID = -2436811942990418985L;

    /**
     * 封装
     *
     * @return
     */
    abstract public byte[] pack();

    /**
     * 解封装
     *
     * @param data
     */
    abstract public void unpack(byte[] data, int offset);

    /**
     * 长度
     *
     * @return
     */
    abstract public int getBytesLength();

}
